package com.party.core.dao.read.system;

import com.party.core.dao.read.BaseReadDao;
import com.party.core.model.system.MemberSysRole;
import com.party.core.model.system.SysRolePrivilege;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * 用户角色关联数据读取 party Created by wei.li on 2016/8/26 0026.
 */
@Repository
public interface MemberSysRoleReadDao extends BaseReadDao<MemberSysRole> {

    /**
     * 根据角色查询角色权限集合
     *
     * @param roleIds
     * @return
     */
    List<SysRolePrivilege> findByRoleIds(@Param("roleIds") Set<String> roleIds);

    /**
     * @Description: 获取用户的全部角色
     * @Param: type，params
     * @return: List<SysRolePrivilege>
     * @Author: Hua Qunhao
     * @Date: 2019-05-29-0029
     */
    List<MemberSysRole> queryMemberRoleAll(@Param("roleIds") Integer type, @Param("params") Map<String, Object> params);
}
